<ion-view view-title="发现任务" hide-nav-bar="true">
	<style>
		.t-result{
			height:40px;
		}
		.pList-scroll{
			position: absolute;
			top: 40px!important;
			bottom: 0;
			left: 0;
			right: 0;
		}
		.slider-slide h3{
			color:#fff;
			margin-top:40px;
		}
		.scroll{
			height:100%;
			line-height: 100%
		}
		.tabbed-slidebox .tsb-icons:after{
			display:none;
		}
	</style>
	<!--=== header ===-->
	<ion-header-bar class="bar-dark prl10">
		<div class="buttons buttons-left header-item" style=" margin-right:5px;">
			<button class="button button-icon button-clear ion-navicon" menu-toggle="left"></button>
		</div>
		<h1 class="title">发现任务</h1>
	</ion-header-bar>
	<!--=== / header ===-->
	<ion-content class="page has-header" lazy-scroll>

		<div class="push-task padding">
			<a ng-href="#/app/push-task" class="button button-outline button-aux button-block" style="margin-bottom: 0;">发布任务</a>
		</div>

		<div class="t-result">
			<tab-slide-box tab="0">

				<div class="tsb-icons ptb10">
					<div class="tsb-ic-wrp">
						<ion-scroll direction="x" class="tsb-hscroll">
							<a href="javascript:;" class="ion-all" ng-click="slideHasChanged(0)">全部</a>
							<a href="javascript:;" class="{{tab.icon}}" ng-repeat="item in categoryList" ng-click="slideHasChanged($index+1)">{{item.name}}</a>
						</ion-scroll>
					</div>
				</div>

				<ion-scroll direction="y" class="taskcase-list list pList-scroll" style="margin-top:70px">
					<ion-refresher pulling-icon="" pulling-text="下拉刷新" on-refresh="doRefresh()"></ion-refresher>
					<ion-slide-box show-pager="false" on-slide-changed="slideHasChanged($index)">

						<ion-slide>
							<a ng-repeat="task in tasks" ui-sref="app.task-detail({id: task.id})" class="item item-thumbnail-left line-se-t item-borderless">
								<img src="{{task.picture_url}}" image-404 >
								<h2><div class="task-name">{{task.property}} <i class="radius20 bg-calm f11">{{task.category}}</i> </div></h2>
								<p class="color-9 mt8">
									{{task.address}} / {{task.area||'未知'}}平方
								</p>
								<div class="row">
									<div class="col f11 color-a mt10">{{task.house_floor}} / {{task.house_layout}}</div>
									<div class="col f11 color-a text-right mt10">{{task.dateline*1000|date : 'yyyy-MM-dd hh:mm'}}</div>
								</div>
							</a>
							<a class="animate-repeat" ng-if="tasks.length == 0" style="height: 100%">
								<h3>该任务分类下还没有任务，赶快来添加任务吧！</h3>
							</a>
						</ion-slide>

						<ion-slide ng-repeat="item in categoryList">
							<a ng-repeat="task in tasks" ui-sref="app.task-detail({id: task.id})"
							   class="item item-thumbnail-left line-se-t item-borderless">
								<img src="{{task.picture_url}}" image-404>
								<h2><div class="task-name">{{task.property}} <i class="radius20 bg-energized f11">{{task.category}}</i> </div></h2>
								<p class="color-9 mt8">
									{{task.address}} / {{task.area||'未知'}}平方
								</p>
								<div class="row">
									<div class="col f11 color-a mt10">{{task.house_floor}} / {{task.house_layout}}</div>
									<div class="col f11 color-a text-right mt10">{{task.dateline*1000|date : 'yyyy-MM-dd hh:mm'}}</div>
								</div>
							</a>
							<a class="animate-repeat" ng-if="tasks.length == 0" style="height: 100%">
								<h3>该任务分类下还没有任务，赶快来添加任务吧！</h3>
							</a>
						</ion-slide>

					</ion-slide-box>

					<ion-infinite-scroll on-infinite="loadMore()" distance="3%">已完成</ion-infinite-scroll>
				</ion-scroll>
			</tab-slide-box>
		</div>
	</ion-content>
</ion-view>
